<template> 
	<view>
		<button @click="add">点击</button>
	</view>
</template>
<script>
import OSS from "ali-oss"
	var client =  require("../../static/service/aliyoss/config.js")
	import { pathToBase64, base64ToPath } from '../../js_sdk/mmmm-image-tools/index.js'
	export default {
		data(){
			
		},
		methods: { 
			add(){
				var path = "http://tmp/yj0GCQiBzltt9e0432dfa0eda47d3bb4045c1439a73d.jpg"
				var size =  Math.ceil(89695 / 8) 
				const buffer = new ArrayBuffer(size);
				console.log("buffer"+buffer.byteLength);
				console.log("size:"+size)
				var a = pathToBase64(path)  
				console.log("a:"+ JSON.stringify(a))
		},
		 // dataURItoBlob(dataURI) {
		 // 		var byteString = atob(dataURI.split(',')[1]);  
		 // 		var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];  
		 // 		var ab = new ArrayBuffer(byteString.length);  
		 // 		var ia = new Uint8Array(ab);  
		 // 		for (var i = 0; i < byteString.length; i++) {  
		 // 			ia[i] = byteString.charCodeAt(i);  
		 // 		}  
		 // 		return new Blob([ab], {type: mimeString});  
		 // }
	},
	}
</script>

<style>
</style>